<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of contract
 *
 * @author nstevens
 */
class contract {
    public $contractID, $contractNumber, $startDate, $endDate, $amount, $projectID, $contractor;
    public $personID, $corName, $phone, $email;
    public function __construct($row) {
        $this->contractID = $row['contractId'];
        $this->contractNumber = $row['contractNumber'];
        $this->startDate = $row['popStart'];
        $this->endDate = $row['popEnd'];
        $this->amount = $row['amount'];
        $this->projectID =$row['projectId'];
        $this->personID = $row['cor'];
        $this->contractor = $row['contractor'];
        $this->phone = getFieldGivenAnID('person', 'personID', $this->personID, 'phone');
        $this->email = getFieldGivenAnID('person', 'personID', $this->personID, 'email');
        $this->name = getFieldGivenAnID('person', 'personID', $this->personID, 'name');
    }
}

?>
